/**
 * 
 */
package com.wsd.dao;

import java.util.Date;
import java.util.List;

import com.wsd.bean.OrderList;
import com.wsd.bean.ProductOrder;

/**
 * @author TuZiJun
 *
 */
public interface ProductOrderDaoInterface {

	public void save(ProductOrder transientInstance);

	public void delete(ProductOrder persistentInstance);

	public ProductOrder findById(java.lang.Integer id);

	public List<ProductOrder> findAll();

	/**
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<ProductOrder> findAll(int start, int limit);

	/**
	 * @param order
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<ProductOrder> findByExample(ProductOrder order, int start, int limit);

	/**
	 * @param order
	 * @return
	 */
	public int findByExampleCount(ProductOrder order);

	/**
	 * @param id
	 * @param state
	 */
	public void updateState(int id, boolean state);

	/**
	 * @param oid
	 */
	public List<OrderList> findOrderList(int oid);

	/**
	 * @param key
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<ProductOrder> search(String key,Date startDate,Date endDate, int start, int limit);

	/**
	 * @param key
	 * @return
	 */
	public int searchCount(String key,Date startDate,Date endDate);

	/**
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public int historyCount(Date startDate, Date endDate);

	/**
	 * @param startDate
	 * @param endDate
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<ProductOrder> history(Date startDate, Date endDate, int start, int limit);

	/**
	 * @param uid
	 * @return
	 */
	public List<ProductOrder> findByStateUid(Integer uid);
}
